package adv5;

import java.io.FileInputStream;
import java.io.IOException;

public class FileInfo2 {

	public static void main(String[] args) {
		FileInputStream fin = null;
		try {
			fin = new FileInputStream("E:\\Temp\\String.txt");
			// fin = new FileInputStream("D:\\迅雷下载\\Windows10._64_CN.iso");
			// int l = fin.available();// 小文件的时候，就是文件的大小
			// System.out.println("可用字节：" + l);
			int ch = 0;
			while ((ch = fin.read()) != -1) {
				System.out.print((char) ch);
			}

		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (fin != null)
				try {
					fin.close();
				} catch (IOException e) {
					// 鸡肋
					// e.printStackTrace();
				}
		}

	}

}
